package com.jayanslow.lighting.server.parser;

public enum Errors {
	//Generic
	UNKNOWN (0xE0), COMMAND (0xE1), FORMAT (0xE2), QUEUE (0xE3),
	//Net
	NOTCONNECTED (0xE4);
	private Errors(int s) { this.code = (short) s; }
	private final short code;
	public short getCode() { return code; }
	public short[] getArray() { return new short[] { code }; }
	public static Errors valueOf(short s) { 
		for (Errors e : Errors.values()) { if (e.getCode() == s) return e; }
		return null;
	}
}